<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>New LiquidCrystal library: /Users/fmalpartida/Documents/development/mercurial repos/SW/NewliquidCrystal/I2CIO.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">New LiquidCrystal library
   &#160;<span id="projectnumber">1.3.2</span>
   </div>
   <div id="projectbrief">Generic LCD control library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">/Users/fmalpartida/Documents/development/mercurial repos/SW/NewliquidCrystal/I2CIO.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// ---------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// Created by Francisco Malpartida on 20/08/11.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//        Attribution-ShareAlike CC BY-SA</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// Thread Safe: No</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">// Extendable: Yes</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// @file I2CIO.h</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// This file implements a basic IO library using the PCF8574 I2C IO Expander</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">// chip.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">// </span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// @brief </span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// Implement a basic IO library to drive the PCF8574* I2C IO Expander ASIC.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// The library implements basic IO general methods to configure IO pin direction</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// read and write uint8_t operations and basic pin level routines to set or read</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// a particular IO port.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">// @version API 1.0.0</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">// ---------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#ifndef _I2CIO_H_</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#define _I2CIO_H_</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;inttypes.h&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define _I2CIO_VERSION &quot;1.0.0&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_i2_c_i_o.html">   41</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_i2_c_i_o.html">I2CIO</a>  </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;{</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;   <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a> ( );</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;   </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;   <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( uint8_t i2cAddr );</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;   </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a> ( uint8_t pin, uint8_t dir );</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;   </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( uint8_t dir );</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;   </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;   uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a> ( <span class="keywordtype">void</span> );</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;   </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;   uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a> ( uint8_t pin );</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;   </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;   <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( uint8_t value );</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;   </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;   <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a> ( uint8_t pin, uint8_t level );</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;   </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;   </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;   </div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;   uint8_t _shadow;      <span class="comment">// Shadow output</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;   uint8_t _dirMask;     <span class="comment">// Direction mask</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;   uint8_t _i2cAddr;     <span class="comment">// I2C address</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;   <span class="keywordtype">bool</span>    _initialised; <span class="comment">// Initialised object</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;   <span class="keywordtype">bool</span> isAvailable (uint8_t i2cAddr);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;   </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;};</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="class_i2_c_i_o_html"><div class="ttname"><a href="class_i2_c_i_o.html">I2CIO</a></div><div class="ttdef"><b>Definition:</b> I2CIO.h:41</div></div>
<div class="ttc" id="class_i2_c_i_o_html_a0341888753bc54c4384f5593a870fb34"><div class="ttname"><a href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">I2CIO::portMode</a></div><div class="ttdeci">void portMode(uint8_t dir)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:103</div></div>
<div class="ttc" id="class_i2_c_i_o_html_ae2063569c927d0008e2593d14504fdcd"><div class="ttname"><a href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">I2CIO::write</a></div><div class="ttdeci">int write(uint8_t value)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:140</div></div>
<div class="ttc" id="class_i2_c_i_o_html_a53b94274eb6bb68564cf5243323db887"><div class="ttname"><a href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">I2CIO::pinMode</a></div><div class="ttdeci">void pinMode(uint8_t pin, uint8_t dir)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:86</div></div>
<div class="ttc" id="class_i2_c_i_o_html_a473206162522b847546777d16a7c6dcd"><div class="ttname"><a href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">I2CIO::digitalWrite</a></div><div class="ttdeci">int digitalWrite(uint8_t pin, uint8_t level)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:180</div></div>
<div class="ttc" id="class_i2_c_i_o_html_ac26221011a8b49bcea9ef62712ea88a7"><div class="ttname"><a href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">I2CIO::digitalRead</a></div><div class="ttdeci">uint8_t digitalRead(uint8_t pin)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:163</div></div>
<div class="ttc" id="class_i2_c_i_o_html_a32eb7832075ad6011d67874405a0d0a6"><div class="ttname"><a href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO::I2CIO</a></div><div class="ttdeci">I2CIO()</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:51</div></div>
<div class="ttc" id="class_i2_c_i_o_html_a6f814653d903dc2ff6e8420eeb7954ae"><div class="ttname"><a href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">I2CIO::begin</a></div><div class="ttdeci">int begin(uint8_t i2cAddr)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:65</div></div>
<div class="ttc" id="class_i2_c_i_o_html_a7a3db7bfc15ede0ae9e8c8bd44290ef7"><div class="ttname"><a href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">I2CIO::read</a></div><div class="ttdeci">uint8_t read(void)</div><div class="ttdef"><b>Definition:</b> I2CIO.cpp:121</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
